<?php
/**
 * 文件描述
 * Created on 2021/8/12 18:22
 * Create by LZH
 */

namespace App\Service\Admin;

use App\Model\Admin\ActionLogModel;
use App\Service\BaseService;

class LoginLogService extends BaseService
{
    public function __construct()
    {
        $this->model = new ActionLogModel();
        parent::__construct();
    }

    /**
     * 获取登录日志列表
     * @return array
     */
    public function getList()
    {
        // 查询条件
        $map = [];

        // 只取登录日志
        $map[] = ['type' => [2, "<="]];

        // 用户账号
        $username = $this->getRequestParam('username');
        if ($username) {
            $map[] = ["username" => [$username]];
        }
        return parent::getList($map);
    }
}
